using System.Collections.Generic;
using UnityEngine;

public class UIRealTimeRankingTimer : UIRealTimeRanking
{
	public override GameRank[] ConvertToRanking(List<Hole> holes)
	{
		GameRank[] array = new GameRank[holes.Count];
		for (int i = 0; i < holes.Count; i++)
		{
			GameRank gameRank = default(GameRank);
			Hole hole = holes[i];
			gameRank.isLocalPlayer = hole.IsLocalPlayer;
			gameRank.content = string.Format("{0} - {1}{2} {3}", i + 1, hole.Points, LocalizationManager.GetTranslation((hole.Points >= 2) ? "TXT_GAME_POINTS" : "TXT_GAME_POINT"), hole.Pseudo);
			gameRank.points = hole.Points;
			if (hole.IsLocalPlayer)
			{
				gameRank.textColor = hole.CurrentSkinParameters.rankingColor;
				gameRank.backgroundColor = hole.CurrentSkinParameters.mainColor;
			}
			else
			{
				gameRank.textColor = hole.CurrentSkinParameters.botRankingColor;
				gameRank.backgroundColor = new Color(0f, 0f, 0f, 0.5882353f);
			}
			array[i] = gameRank;
		}
		return array;
	}
}
